﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<PagedList<CognisessDA.Feedback>>" %>
<%@ Import Namespace="Webdiyer.WebControls.Mvc" %>
<div id="dvFeedback">
    <h2>
        Feedback</h2>
    <table>
        <tr>
            <th>
                Id
            </th>
            <th>
                Realname
            </th>
            <th>
                Email
            </th>
            <th>
                Country
            </th>
            <th>
                FeedSubject
            </th>
            <th>
                CreateTime
            </th>
            <th>
            </th>
        </tr>
        <% foreach (var item in Model)
           { %>
        <tr>
            <td>
                <%= Html.Encode(item.Id) %>
            </td>
            <td>
                <%= Html.Encode(item.Realname) %>
            </td>
            <td>
                <%= Html.Encode(item.Email) %>
            </td>
            <td>
                <%= Html.Encode(item.Country) %>
            </td>
            <td>
                <%= Html.Encode(item.FeedSubject) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:g}", item.CreateTime)) %>
            </td>
            <td align="center">
                <a href="/FeedBack/Edit/<%=item.Id %>">
                    <img src='../../Content/images/backstage_img5.gif' alt="Edit" /></a> <a href="/FeedBack/Details/<%=item.Id %>">
                        <img src='../../Content/images/backstage_img7.gif' alt="Details" /></a>
                <a href="/FeedBack/Delete/<%=item.Id %>">
                    <img src='../../Content/images/backstage_img4.gif' alt="Delete" onclick="return confirm('Are you sure to delete this record?');" /></a>
            </td>
        </tr>
        <% } %>
    </table>
    <%= Html.AjaxPager(Model, new PagerOptions { CssClass = "mvcPager", AutoHide = false, ShowMorePagerItems = false, ShowGoButton = false, PageIndexParameterName = "id", AlwaysShowFirstLastPageNumber = true, ShowPageIndexBox = true, PageIndexBoxWrapperFormatString = "Page {0}" }, new AjaxOptions { UpdateTargetId = "dvFeedback" })%>
    <p style="margin-top: 10px;">
        <%= Html.ActionLink("Create New", "Create") %>
    </p>
</div>
